"""
   -*- coding: utf-8 -*-
   @Time    : 2021/4/23 12:18
   @Author  : 狠欢
   @File    : jihuoma.py
   @Software: PyCharm
"""
import random, string

def jihuoma(n):
    #  生成n个激活码
    if n.isdigit():
        with open('jihuoma.txt', 'w')as f:
            for i in range(int(n)):
                for j in range(32):
                    num1 = random.choice(num)
                    f.write(num1)
                f.write("\n")
    else:
        print("输入不合法")

n = input("输入想产生几个激活码：")
num =string.ascii_uppercase+string.digits
jihuoma(n)

















